/**
 * Copyright(c) 2014 Xunton Solutions
 *
 * History:
 *   15-12-8 下午1:00 Created by dwzhang
 */
package com.jade.modules.message.common;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

import com.jade.journal.JournalEntity;

/**
 * 抽象的消息日志。
 *
 * @author <a href="mailto:dwzhang@xunton.com">dwzhang</a> 
 * @version 1.0 15-12-8 下午1:00
 */
@MappedSuperclass
public abstract class AbstractMessageJournal
        extends JournalEntity
{
    //短信类型，目前包括订单受理通知，订单到达通知
    @Column (name = "type", nullable = false, length = 32)
    protected String type;
    //子类型
    @Column (name = "sub_type", nullable = false, length = 32)
    protected String subType;
    //根据type而定，订单相关的为orderNo
    @Column (name = "fid", length = 64)
    protected String fid;
    @Column (name = "operator", length = 32)
    protected String operator;
    @Column (name = "sender", length = 32)
    protected String sender;
    @Column (name = "receiver", length = 32)
    protected String receiver;
    @Column (name = "content", nullable = false, length = 512)
    protected String content;
    @Column (name = "status", nullable = false)
    protected int status;
    @Column (name = "status_message", length = 512)
    protected String statusMessage;
    @Column (name = "journal_date")
    protected Date journalDate;

    protected AbstractMessageJournal(String name)
    {
        super(name);
    }

    public String getType()
    {
        return type;
    }

    public void setType(String type)
    {
        this.type = type;
    }

    public String getSubType()
    {
        return subType;
    }

    public void setSubType(String subType)
    {
        this.subType = subType;
    }

    public String getFid()
    {
        return fid;
    }

    public void setFid(String fid)
    {
        this.fid = fid;
    }

    public String getOperator()
    {
        return operator;
    }

    public void setOperator(String operator)
    {
        this.operator = operator;
    }

    public String getSender()
    {
        return sender;
    }

    public void setSender(String sender)
    {
        this.sender = sender;
    }

    public String getReceiver()
    {
        return receiver;
    }

    public void setReceiver(String receiver)
    {
        this.receiver = receiver;
    }

    public String getContent()
    {
        return content;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    public int getStatus()
    {
        return status;
    }

    public void setStatus(int status)
    {
        this.status = status;
    }

    public String getStatusMessage()
    {
        return statusMessage;
    }

    public void setStatusMessage(String statusMessage)
    {
        this.statusMessage = statusMessage;
    }

    public Date getJournalDate()
    {
        return journalDate;
    }

    public void setJournalDate(Date journalDate)
    {
        this.journalDate = journalDate;
    }
}
